package io.gitee.mojingjiao.day05;

import org.junit.Test;

import java.util.HashSet;
import java.util.Set;

public class TotalNums {
    private static final String word="Stack Overflow requires external JavaScript from overflow another or domain," +
            "which is blocked or failed to or load.";
    @Test
    public void test(){
        String[] s1=word.split("[ ,.]");
        Set <String> set=new HashSet<>();
//创建了一个set链表，Hashset对象。调用add方法往里面加单词
        for(String e:s1){
            set.add(e);
        }
        System.out.println("不重复的有："+set.size());


    }
}
